-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[EP ABI] Add CreateCustomOpDomains() API for plugin EP to register custom ops #26759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chilo-ms
wants to merge
52
commits into
main
Choose a base branch
from
chi/custom_op_for_ep
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onnxruntime/test/autoep/library/example_plugin_ep/ep_factory.cc
Outdated
Show resolved
Hide resolved
ynankani
reviewed
Dec 12, 2025
edgchen1
reviewed
Dec 20, 2025
onnxruntime/test/autoep/library/example_plugin_ep/ep_custom_op.h
Outdated
Show resolved
Hide resolved
ynankani
reviewed
Dec 23, 2025
edgchen1
reviewed
Jan 15, 2026
adrianlizarraga
previously approved these changes
Jan 16, 2026
edgchen1
previously approved these changes
Jan 16, 2026
6a571ef
adrianlizarraga
previously approved these changes
Jan 16, 2026
edgchen1
previously approved these changes
Jan 16, 2026
3b2e5a5
Contributor
Author
|
It seems i need to address Copilot comment in order to merge. |
adrianlizarraga
approved these changes
Jan 17, 2026
Contributor
Author
|
I think all the comments are resolved and can't find the one that is unresolved (might be outdated and not show), so this PR still can't be merged.
i created another identical PR here and can merge that one if we still can't fix this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Description
The newly added two APIs,
CreateCustomOpDomains()andGetNumCustomOpDomains, are used when running inference on a model that contains EP-specific custom operations.Workflow:
OrtCustomOpDomaininstances.SessionOptionsAppendExecutionProvider_V2()with anOrtEpDevicecontainingthe plugin EP's factory or 2) enables auto ep selection.
SessionOptionsAppendExecutionProvider_V2()appends the provided OrtCustomOpDomains to thesession options or 2) registers the OrtCustomOpDomains from the selected EP devices.
As a result, any session created from these session options will have these custom op domains registered
in ORT, ensuring that the custom ops are properly recognized and validated when the model is loaded.
Plugin EPs can provide two types of custom ops:
A full OrtCustomOp with a concrete kernel implementation
that the custom node should NOT be fused or compiled. Instead, ORT should invoke
the custom node's Compute() function at runtime.
A "placeholder" OrtCustomOp with an empty kernel implementation
does nothing. The purpose is to satisfy model validation during model loading by
registering the custom op as a valid operator in the session.
notify ORT that this custom node should be fused and compiled by the EP.
the fused custom node.
Motivation and Context
Currently, the provider-bridge TRT RTX EP and TRT EP supports registering custom op domain list in session option so
that it can run model contains TRT specific custom ops.
This PR adds the same feature for plugin EP.